From: Keir Fraser Date: Sat, 29 Dec 2007 17:55:47 +0000 (+0000) Subject: vmx: Fix the 2nd argument of cpuid_count() in vmx_cpuid_intercept() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14445^2~80 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=ca4bd2c1aea9818c9220d2a8c967fa1187448ad5;p=xen.git vmx: Fix the 2nd argument of cpuid_count() in vmx_cpuid_intercept() For input 0x00000004, the value of "*ecx" has been overwritten by the cpuid() in hvm_cpuid(), causing a bad value passed to cpuid_count(). Signed-off-by: Dexuan Cui --- diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 1e700d8d2e..b414078ab2 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -1235,6 +1235,7 @@ void vmx_cpuid_intercept( unsigned int *ecx, unsigned int *edx) { unsigned int input = *eax; + unsigned int count = *ecx; #ifdef VMXASSIST if ( input == 0x40000003 ) @@ -1293,7 +1294,7 @@ void vmx_cpuid_intercept( break; case 0x00000004: - cpuid_count(input, *ecx, eax, ebx, ecx, edx); + cpuid_count(input, count, eax, ebx, ecx, edx); *eax &= NUM_CORES_RESET_MASK; break;